ProductPortlet = Class.extend({
	init: function()	{
		this.name = "ProductPortlet";
	},
	
	onReloadPage: function()	{
		this.run();
	},
	
	run: function()	{
		//store the current object
		var obj = this;
		var id = this.getRequest().getParam('id');
		this.onAjax('product', 'load-product-detail', {id: id}, 'GET', {
			'onSuccess': function(ret)	{
				obj.model = ret;
				obj.getPortletPlaceholder().paintCanvas(obj.render());
			}
		});
	}
}).implement(PortletInterface).implement(RenderInterface).implement(AjaxInterface);